﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.WindowsAzure.StorageClient;

namespace AzureGames.Data.Implementation.ServiceEntities
{
    public class UserEntity : PlayerEntity
    {
        public string NameIdentifier { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Email { get; set; }
        public DateTime? LastLogin { get; set; }
        public DateTime? LastGamePlayed { get; set; }
        public DateTime? LastContributeDate { get; set; }
        public string LoginType { get; set; }        

        public static implicit operator Model.User(UserEntity from)
        {
            return AutoMapper.Mapper.Map<UserEntity, Model.User>(from);
        }

        public static implicit operator UserEntity(Model.User from)
        {
            return AutoMapper.Mapper.Map<Model.User, UserEntity>(from);
        }
    }
}
